﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<IEnumerable<WRSManagementSystem.DomainModel.Entities.Project>>" %>
<%@ Import Namespace="WRSManagementSystem.DomainModel.Entities" %>

    <table>
        <tr>
            <th></th>
            <th>
                Id
            </th>
            <th>
                Nazwa
            </th>
            <th>
                Początek
            </th>
            <th>
                Koniec
            </th>
        </tr>

    <%
        foreach (Project item in Model)
        {%>
    
        <tr>
            <td>
                <%=Html.ActionLink("Edytuj", "../Project/Edit", new {id = item.Id})%> |
                <%=Html.ActionLink("Szczegóły", "../Project/Details", new {id = item.Id})%>
            </td>
            <td>
                <%=Html.Encode(item.Id)%>
            </td>
            <td>
                <%=Html.Encode(item.Name)%>
            </td>
            <td>
                <%=Html.Encode(String.Format("{0:g}", item.StartDate))%>
            </td>
            <td>
                <%=Html.Encode(String.Format("{0:g}", item.EndDate))%>
            </td>
        </tr>
    
    <%
        }%>

    </table>


